package com.squirrel.common.mapper;

import com.squirrel.common.entity.UserComment;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * UserCommentMapper 用户评论接口
 * </p>
 *
 * @author 关远键
 * @since 2021/11/11 16:06
 */
@Repository
public interface UserCommentMapper extends BaseMapper<UserComment> {

    // 用户与评论的关系
    UserComment getRelationship(@Param("userId") Integer userId, @Param("commentId") Integer commentId);

    // 点赞数
    Integer countGoodByUserId(@Param("userId") Integer userId);

}
